public class ForLoopDemo2 {
    public static void main(String[] args){
        int[] clubCounts = {25,32,18};
        String[] clubNames = {"编程社","动漫社","志愿者社"};
        int allTotal = 0;

        System.out.println("各社团报名人数：");
        for (int count : clubCounts){
            System.out.println(count + "人");
            allTotal += count;
        }
        System.out.println("\n 社团名称-报名人数明细: ");
        for (int i = 0; i < clubNames.length;i++){
            System.out.println(clubNames[i] +" : " + clubCounts[i] + "人");
        }
        System.out.println("\n 所以社团总报名人数:" + allTotal);
    }
}
